﻿<UserControl x:Class="WpfFileExplorer.Views.DriveView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             x:Name="driveView" BorderThickness="0"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <ListBox ItemsSource="{Binding Path=Drives}" SelectedItem="{Binding Path=SelectedDrive}" IsSynchronizedWithCurrentItem="True" BorderThickness="0">
        <ListBox.ItemsPanel>
            <ItemsPanelTemplate>
                <StackPanel Orientation="Horizontal" IsItemsHost="True" />
            </ItemsPanelTemplate>
        </ListBox.ItemsPanel>
        <ListBox.ItemTemplate>
            <DataTemplate>
                <Button Content="{VBinding Path=Name}" Command="{Binding ElementName=driveView, Path=DataContext.SelectDrive}" CommandParameter="{Binding}" MinWidth="30"/>
            </DataTemplate>
        </ListBox.ItemTemplate>
    </ListBox>
</UserControl>
